{% extends 'base_main_user.html' %}

{% block header_con %}
{% endblock %}
{% block search_bar_clearfix %}
{% endblock %}
{% block left_menu %}
{% endblock %}
{% block footer %}
    <div class="footer no-mp">
{% endblock %}
{% block content %}
    <div class="register_con">
		<div class="l_con fl">
            {% load static %}
			<a class="reg_logo"><img src='{% static "images/logo02.png" %}'></a>
			<div class="reg_slogan">足不出户  ·  新鲜每一天</div>
			<div class="reg_banner"></div>
		</div>

		<div class="r_con fr">
			<div class="reg_title clearfix">
				<h1>用户注册</h1>
				<a href="{% url 'user:login' %}">登录</a>
			</div>
			<div class="reg_form clearfix">
				<form method="post">
                    {% csrf_token %}
				<ul>
					<li>
						<label>用户名:</label>
						<input type="text" name="user_name" id="user_name" value="{{ data.user_name }}">
						{{ errors.user_name.0 }}
					</li>
					<li>
						<label>密码:</label>
						<input type="password" name="pwd" id="pwd" value="{{ data.pwd }}">
						{{ errors.pwd.0 }}
					</li>
					<li>
						<label>确认密码:</label>
						<input type="password" name="cpwd" id="cpwd" value="{{ data.cpwd }}">
						{{ errors.cpwd.0 }}
					</li>
					<li>
						<label>邮箱:</label>
						<input type="text" name="email" id="email" value="{{ data.email }}">
						{{ errors.email.0 }}
					</li>
					<li class="agreement">
						<input type="checkbox" name="allow" id="allow" checked="checked">
						<label>同意”天天生鲜用户使用协议“</label>
                        {% if data %}请勾选协议{% endif %}
					</li>
					<li class="reg_sub">
						<input type="submit" value="注 册" name="">
					</li>
				</ul>
				</form>
			</div>
		</div>
	</div>
{% endblock %}
